<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="${pageContext.request.contextPath }/js/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath }/js/kindeditor-4.1.10/kindeditor-all-min.js"></script>
<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath }/js/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script>
<link id="easyuiTheme" rel="stylesheet" type="text/css"	href="${pageContext.request.contextPath }/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/default.css">
<script type="text/javascript" src="${pageContext.request.contextPath }/js/easyui/jquery.easyui.min.js"></script>
<script	src="${pageContext.request.contextPath }/js/easyui/locale/easyui-lang-zh_CN.js"	type="text/javascript"></script>
<script src="${pageContext.request.contextPath }/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/ajaxfileupload.js"></script>
</head>

<body>

<div style="padding:10px 10px 10px 10px">

		<form id="jobAddForm" class="table-edit" method="post">
	    <table cellpadding="5">
	        <tr>
	            <td>职位类别:</td>
	            <td>
	            	<select class="easyui-combobox" name="jobCategory" style=”width:200px;”>
						<option value="1">校园招聘</option>
						<option value="2">社会招聘</option>
						<option value="3">大学生实习</option>
					</select>
	            </td>
	        </tr>
	        <tr>
	            <td>职位名称:</td>
	            <td>
	            	<input class="easyui-validatebox" required="true" type="text" name="jobName" style="width: 280px;"></input>
	            </td>
	        </tr>
	        <tr>
	            <td>性别要求:</td>
	            <td>
	            	<select class="easyui-combobox" name="sex" style=”width:200px;”>
						<option value="不限">不限</option>
						<option value="男">男</option>
						<option value="女">女</option>
					</select>
	            </td>
	        </tr>
	        <tr>
	            <td>学历要求:</td>
	            <td>
	            	<select class="easyui-combobox" name="education" style=”width:200px;”>
						<option value="不限">不限</option>
						<option value="大专">大专</option>
						<option value="大专及以上">大专及以上</option>
						<option value="本科">本科</option>
						<option value="本科及以上">本科及以上</option>
						<option value="硕士">硕士</option>
						<option value="硕士及以上">硕士及以上</option>
						<option value="博士">博士</option>
						<option value="博士及以上">博士及以上</option>
					</select>
	            </td>
	        </tr>
	        <tr>
	            <td>招聘人数:</td>
	           <td><input class="easyui-validatebox" required="true" type="text" name="jobNum" style="width: 90px;">个</input></td>
	        </tr>
	        <tr>
	            <td>薪资:</td>
	           <td><input class="easyui-validatebox" required="true" type="text" name="remark" style="width: 90px;"></input></td>
	        </tr>
	        
	        <tr>
	            <td>是否发布:</td>
	            <td>
	            	<select  name="ispush" style=”width:200px;”>
						<option value="1">是</option>
						<option value="0">否</option>
					</select>
	            </td>
	            
	        </tr>
	       
	        <tr>
	            <td>详情:</td>
	            <td>
	                <textarea style="width:800px;height:500px;visibility:hidden;" name="content"></textarea>
	            </td>
	        </tr>
	    </table>
	</form>
	<div style="padding:5px">
	    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
	    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">重置</a>
	</div>
</div>

</body>
<script type="text/javascript">

	var jobAddEditor ;
	$(function(){
		//创建编辑器
		jobAddEditor = HONGXIN.createEditor("#jobAddForm [name=content]");
		//初始化编辑器
		HONGXIN.init({fun:function(node){
		}});
	}); 
	
	
	//提交表单
	function submitForm(){
		//有效性验证
		if(!$('#jobAddForm').form('validate')){
			$.messager.alert('提示','表单还未填写完成!');
			return ;
		}
		
		$.post("${pageContext.request.contextPath}/job/saveJob",$("#jobAddForm").serialize(), function(data){
			if(data.status == 200){
				$.messager.alert('提示','招聘职位发布成功!');
				 //清空表单
				clearForm();
			}
		});
	}
	
	function clearForm(){
		$('#jobAddForm').form('reset');
		jobAddEditor.html('');
	}

</script>
